//
//  OldPhotoKnowController.m
//  OldPhoto
//
//  Created by 蓝鳍互娱 on 2024/7/29.
//

#import "OldPhotoKnowController.h"

@interface OldPhotoKnowController ()
@end
@implementation OldPhotoKnowController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatOldPhotoNavView];
    self.oldPhotoNavTitle = @"老照片保存tips";
}
- (void)creatOldPhotoInitView{
    [super creatOldPhotoInitView];
    UIScrollView *oldPhotoLongImgScrollView = [[UIScrollView alloc] init];
    oldPhotoLongImgScrollView.showsVerticalScrollIndicator = false;
    oldPhotoLongImgScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    oldPhotoLongImgScrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
    [self.view addSubview:oldPhotoLongImgScrollView];
    [oldPhotoLongImgScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(@(OldPhotoRatio(0)));
    }];
    UIView *oldPhotoLongImgScrollContentView = [[UIView alloc] init];
    oldPhotoLongImgScrollContentView.backgroundColor = [UIColor clearColor];
    [oldPhotoLongImgScrollView addSubview:oldPhotoLongImgScrollContentView];
    [oldPhotoLongImgScrollContentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(@(OldPhotoRatio(0)));
    }];
    UIImageView * oldPhotoLongImgView = [[UIImageView alloc] init];
    oldPhotoLongImgView.userInteractionEnabled = true;
    [oldPhotoLongImgScrollContentView addSubview:oldPhotoLongImgView];
    [oldPhotoLongImgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(OldPhotoRatio(0)));
        make.width.equalTo(@(OldPhotoScreenWidth));
        make.top.equalTo(@(OldPhotoRatio(0)));
        make.bottom.equalTo(@(OldPhotoRatio(0)));
    }];
    UIImage * oldPhotoLongImg = OldPhotoImageNamed(@"OldPhotoTalkPhotoBg");
    oldPhotoLongImgView.image = oldPhotoLongImg;
    CGFloat oldPhotoLongImgHeight = OldPhotoScreenWidth *(oldPhotoLongImg.size.height/(CGFloat)oldPhotoLongImg.size.width);
    oldPhotoLongImgScrollView.contentSize = CGSizeMake(0, oldPhotoLongImgHeight);
}
@end
